<template>
  <div class="search">
    <div class="top_search">
      <div class="input_div">
        <img src="../assets/icon_serach1.png"/>
        <span>尖椒肉丝</span>  
      </div>
      <div class="span1"><span>取消</span></div>
    </div>
    <div class="search_history">
      <span>搜索历史</span>
      <span>清除搜索历史</span>
    </div>        
    <div class="search1_text" v-for="(item,index) in datalist" >
      <div class="search_text" v-for="it in item.name">
        <div>{{it.searchName}}</div>
      </div>
    </div>
    
    <div class="search_history">
      <span>热门搜索</span>
    </div>
    <div class="search1_text" v-for="(item,index) in firelist" >
      <div class="search_text" v-for="it in item.fire">
        <div>{{it.searchName}}</div>
      </div>
    </div>
  </div>
</template>
<script>
	export default{
		data(){
			return{
				datalist:[
					{
						name:[
							{"searchName":"尖椒肉丝"},
							{"searchName":"鲜花"},
							{"searchName":"山姆会员商店"},
							{"searchName":"新鲜水果"}
						]
					},
					{
						name:[
							{"searchName":"生日鲜花"},
							{"searchName":"香槟玫瑰"},
							{"searchName":"酸奶"},
							{"searchName":"牛奶"}
						]
					}				
				],
				firelist:[
					{
						fire:[
							{"searchName":"尖椒肉丝"},
							{"searchName":"鲜花"},
							{"searchName":"山姆会员商店"},
							{"searchName":"新鲜水果"}
						],						
					},
					{
						fire:[
							{"searchName":"生日鲜花"},
							{"searchName":"香槟玫瑰"},
							{"searchName":"酸奶"},
							{"searchName":"牛奶"}
						]
					}
				]	
			}
		},
		methods:{
			
		}
	}
</script>

<style scoped>
  .search{
    background: #F9F9F9;
    height: 900px;
  }
  .top_search{
    display: flex;
  }
  .top_search .span1{
    margin-top: 24px;
    font-size: 14px;
    padding-right: 20px;
  }
  .input_div img{
	  padding-left: 18px;
  }
  .input_div{
    background: #F5F5F5;
    margin-left: 20px;
    margin-top: 20px;
    margin-right: 60px;
    border-radius: 16px;
    height: 32px;
    display: flex;
    flex-direction: row;
    text-align: center;
    flex: 2;
  }
  .input_div :nth-child(1){
    height: 20px;
    width: 20px;
    padding-top: 8px;
  }
  .input_div :nth-child(2){
    padding-top: 8px;
    font-size: 16px;
    color: #333333;
    line-height: 16px;
    padding-left: 12.1px;
    padding-left: 26px;
    padding-bottom: 10px;
  }
  .span1{
    display: inline-block;
  }
  .search_history{
    padding-top: 30px;
    display: flex;
    justify-content: space-between;
  }
  .search_history :nth-child(1){
    padding-left: 20px;
    font-size: 16px;
    color: #000000;
    letter-spacing:2px;
    font-weight: bold;
  }
  .search_history :nth-child(2){
    padding-right: 20px;
    font-size: 14px;
    color: #000000;
    letter-spacing: 2px;
  }
  .search1_text{
    display: flex;
    padding-top: 16px;
    height: 32px;
    line-height: 32px;
    font-size: 12px;
  }
  .search_text{
    display: flex;
    padding-top: 16px;
    height: 32px;
    line-height: 32px;
    font-size: 15px;
  }
  .search_text div{
    background-color: #F5F5F5;
    height: 32px;
    line-height: 32px;
    margin-left: 18px;
    text-align: center;
  }
  .search1_text :nth-child(1){
    flex: 3;
  }
  .search1_text :nth-child(2){
    flex: 3;
  }
  .search1_text :nth-child(3){
    flex: 4;
  }
  .search1_text :nth-child(4){
    margin-right: 20px;
    flex: 3;
  }
</style>
